<div class="top_nav">
    <div class="nav_menu">
        <nav class="" role="navigation">
            <div class="nav toggle">
                <a id="menu_toggle"><i class="fa fa-bars"></i></a>
            </div>
            <?php
                $admin_info = session_get(UserEnum::ADMIN_USER_KEY);
                $cont=AdminService::instance()->MailCount();
                if(empty($admin_info)){
                    echo "<script>alert('请登录');location='/admin/login/html';</script>";return;
                }
            ?>
            <ul class="nav navbar-nav navbar-right">
                <li class="">
                    <a href="javascript:;" class="user-profile dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                        <img src="{{$admin_info->avatar}}" alt=""><?php if(!empty($admin_info)){?>{{$admin_info->user_nick}}<?php }?>
                        <span class=" fa fa-angle-down"></span>
                    </a>
                    <ul class="dropdown-menu dropdown-usermenu animated fadeInDown pull-right">
                        <li><a href="/admin/manage_admin"> 账户</a>
                        </li>
                        <li>
                            <a href="javascript:;">帮助</a>
                        </li>
                        <li><a href="/admin/login_out" onclick="Javascript:return confirm('确实要退出系统吗？')"><i class="fa fa-sign-out pull-right"></i> 退出</a>
                        </li>
                    </ul>
                </li>
                <!---->
                <li role="presentation" class="dropdown">
                    <?php if(!empty($cont)){?>
                        <a href="/admin/mail" class="dropdown-toggle info-number">
                            <i class="fa fa-envelope-o"></i>
                            <span class="badge bg-green">{{$cont}}</span>
                        </a>
                    <?php }?>
                </li>

            </ul>
        </nav>
    </div>

</div>